{\rtf1\ansi\ansicpg936\cocoartf1404\cocoasubrtf470
{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;\f1\fnil\fcharset134 PingFangSC-Regular;}
{\colortbl;\red255\green255\blue255;\red29\green133\blue25;\red180\green0\blue98;\red32\green60\blue63;
\red68\green137\blue147;\red92\green38\blue153;\red77\green0\blue158;\red46\green13\blue110;\red186\green0\blue17;
\red0\green11\blue255;\red100\green56\blue32;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\deftab722
\pard\tx722\pardeftab722\pardirnatural\partightenfactor0

\f0\fs30 \cf0 \CocoaLigature0     \
    \cf2 //
\f1 \'d7\'aa\'b6\'af\'b5\'da\'c8\'fd\'d6\'d6\'b7\'bd\'b7\'a8 \'b3\'f5\'ca\'bc\'bb\'af\'b6\'af\'bb\'ad
\f0 \cf0 \
    [\cf3 self\cf0  \cf4 initAnimatiom\cf0 ];\
    \cf2 //
\f1 \'cf\'c8\'b2\'bb\'d2\'aa\'c8\'c3\'b6\'af\'bb\'ad\'b2\'a5\'b7\'c5
\f0 \cf0 \
    [\cf3 self\cf0  \cf4 pauseLayer\cf0 :\cf3 self\cf0 .\cf5 imageView\cf0 .\cf6 layer\cf0 ];\
\
\
///////////////////////////////////////////////////////\
\pard\tx722\tx1362\pardeftab722\pardirnatural\qj\partightenfactor0
\cf0 \
\pard\tx722\pardeftab722\pardirnatural\partightenfactor0
\cf0 - (\cf3 void\cf0 )initAnimatiom \{\
    \cf2 //
\f1 \'b4\'b4\'bd\'a8\'d2\'bb\'b8\'f6\'c8\'c6
\f0 z
\f1 \'d6\'e1\'d1\'a1\'d4\'f1\'b5\'c4\'b6\'af\'bb\'ad
\f0 \cf0 \
    \cf7 CABasicAnimation\cf0  *animation = [\cf7 CABasicAnimation\cf0  \cf8 animationWithKeyPath\cf0 :\cf9 @"transform.rotation.z"\cf0 ];\
    \cf2 //
\f1 \'d0\'fd\'d7\'aa\'d2\'bb\'d6\'dc
\f0 \cf0 \
    animation.\cf6 toValue\cf0  = \cf10 @(2\cf0 *\cf11 M_PI\cf10 )\cf0 ;\
    \cf2 //
\f1 \'d1\'ad\'bb\'b7\'b4\'ce\'ca\'fd\'a3\'ac\'be\'a1\'c1\'bf\'b4\'f3
\f0 \cf0 \
    animation.\cf6 repeatCount\cf0  = \cf11 MAXFLOAT\cf0 ;\
    \cf2 //
\f1 \'d6\'b4\'d0\'d0\'d2\'bb\'b4\'ce\'b6\'af\'bb\'ad\'d0\'e8\'d2\'aa\'b5\'c4\'ca\'b1\'bc\'e4
\f0 \cf0 \
    animation.\cf6 duration\cf0  = \cf10 50.0f\cf0 ;\
    [\cf3 self\cf0 .\cf5 imageView\cf0 .\cf6 layer\cf0  \cf8 addAnimation\cf0 :animation \cf8 forKey\cf0 :\cf9 @"rotationAnimation"\cf0 ];\
\}\
\
- (\cf3 void\cf0 )pauseLayer:(\cf7 CALayer\cf0 *)layer\
\{\
    \cf6 CFTimeInterval\cf0  pausedTime = [layer \cf8 convertTime\cf0 :\cf8 CACurrentMediaTime\cf0 () \cf8 fromLayer\cf0 :\cf3 nil\cf0 ];\
    layer.\cf6 speed\cf0  = \cf10 0.0\cf0 ;\
    layer.\cf6 timeOffset\cf0  = pausedTime;\
\}\
- (\cf3 void\cf0 )resumeLayer:(\cf7 CALayer\cf0 *)layer\
\{\
    \cf6 CFTimeInterval\cf0  pausedTime = [layer \cf8 timeOffset\cf0 ];\
    layer.\cf6 speed\cf0  = \cf10 1.0\cf0 ;\
    layer.\cf6 timeOffset\cf0  = \cf10 0.0\cf0 ;\
    layer.\cf6 beginTime\cf0  = \cf10 0.0\cf0 ;\
    \cf6 CFTimeInterval\cf0  timeSincePause = [layer \cf8 convertTime\cf0 :\cf8 CACurrentMediaTime\cf0 () \cf8 fromLayer\cf0 :\cf3 nil\cf0 ] - pausedTime;\
    layer.\cf6 beginTime\cf0  = timeSincePause;\
\}\
\
\
//////////////////////////////////////////////\
button\
if 
\f1 \'b2\'a5\'b7\'c5
\f0 \
 \cf2 //
\f1 \'bc\'cc\'d0\'f8\'b7\'e2\'c3\'e6\'cd\'bc\'c6\'ac\'b5\'c4\'d0\'fd\'d7\'aa
\f0 (
\f1 \'b6\'af\'bb\'ad\'bf\'c9\'c4\'dc\'d4\'da\'b2\'a5\'b7\'c5\'bd\'e1\'ca\'f8\'b5\'c4\'ca\'b1\'ba\'f2\'b1\'bb\'d2\'c6\'b3\'fd
\f0 )\cf0 \
        \cf7 CAAnimation\cf0  * anim = [\cf3 self\cf0 .\cf5 imageView\cf0 .\cf6 layer\cf0  \cf8 animationForKey\cf0 :\cf9 @"rotationAnimation"\cf0 ];\
        \cf3 if\cf0  (anim == \cf3 nil\cf0 ) \{\
            [\cf3 self\cf0  \cf4 initAnimatiom\cf0 ];\
        \}\cf3 else\cf0 \{\
            [\cf3 self\cf0  \cf4 resumeLayer\cf0 :\cf3 self\cf0 .\cf5 imageView\cf0 .\cf6 layer\cf0 ];\
        \}\
\
\
else\
\
\cf2 //
\f1 \'d4\'dd\'cd\'a3\'b7\'e2\'c3\'e6\'cd\'bc\'c6\'ac\'b5\'c4\'d0\'fd\'d7\'aa
\f0 \cf0 \
        \cf7 CAAnimation\cf0  * anim = [\cf3 self\cf0 .\cf5 imageView\cf0 .\cf6 layer\cf0  \cf8 animationForKey\cf0 :\cf9 @"rotationAnimation"\cf0 ];\
        \cf3 if\cf0  (anim) \{\
            \cf2 //
\f1 \'d4\'dd\'cd\'a3\'b6\'af\'bb\'ad
\f0 \cf0 \
            [\cf3 self\cf0  \cf4 pauseLayer\cf0 :\cf3 self\cf0 .\cf5 imageView\cf0 .\cf6 layer\cf0 ];\
        \}\
}